package com.yunyike.app.util;

import com.yunyike.app.constants.EnumExchangeRate;

public class ExchangeRateUtils {

	/**
	 * 转换人民币
	 * @param currencyFrom
	 * @param amount
	 * @return
	 */
	public static double exchangeRate(EnumExchangeRate enumExchangeRate, double amount){
		
		return amount * enumExchangeRate.getExchangeRate();
	}
	
	public static void main(String[] args) {
		
		double guonei = 100;
		
		double price = 10;
		
		double exchangeRate = exchangeRate(EnumExchangeRate.CNY, price);
		
		System.out.println(exchangeRate);
		
		System.out.println(guonei - exchangeRate);
		
	}
}
